import Qt 4.7

Rectangle {
    id: rectangle1
    x: 2
    y: 2
    width: 350
    height: 47
    color: "#000000"
    radius: 10
    opacity: 0.68
    border.width: 4
    border.color: "#444343"

    property string buttonText : ""

    signal buttonClicked

    Text {
        id: text1
        x: 0
        y: 7
        color: "#ffffff"
        text: buttonText
        anchors.centerIn: parent
        horizontalAlignment: Text.AlignLeft
        font.pixelSize: parent.height / 2
        font.family: "MV Boli"
        styleColor: "#e82121"
    }

    MouseArea {
        id: click
        anchors.fill: parent
        onPressed: parent.state = "pressed"
        onReleased: parent.state = ""

        onClicked: rectangle1.buttonClicked()
    }
    states: [
        State {
            name: "pressed"

            PropertyChanges {
                target: rectangle1
                color: "#e8e3e3"
            }

            PropertyChanges {
                target: text1
                color: "#000000"
            }
        }
    ]

}
